package com.syedu.day08.homework;

import java.time.LocalDate;

/**
 * @Description 销售人员
 * @createTime 2022/3/18 9:14
 * @author Administrator
 */
public class SalesEmployee extends  Employee{
    private double total;//销售额
    private double rank;// 提成率

    public SalesEmployee() {

    }

    public SalesEmployee(String name, LocalDate birthday, double total, double rank) {
        super(name, birthday);
        this.total = total;
        this.rank = rank;
    }

    public double getTotal() {
        return total;
    }

    public void setTotal(double total) {
        this.total = total;
    }

    public double getRank() {
        return rank;
    }

    public void setRank(double rank) {
        this.rank = rank;
    }

    @Override
    public double getSalary(int month) {
        return super.getSalary(month) + total * rank;
    }
}
